#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QDialog>
#include <QFileDialog>
#include <QMessageBox>
#include "fmod.h"
#include <QMediaPlayer>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    QString filePath;
    QAction *actOpenFile;
    QMediaPlayer *player;
    QMediaPlaylist *playlist;

    void init();
    void errorHandling(QString msg);
    void loadMusic();
    void updatePosition(qint64 position);


private slots:
    void openFile();
    void on_buttonPlay_clicked();
    void on_playSlider_sliderMoved(int position);
    void on_buttonPause_clicked();
    void on_buttonStop_clicked();
};
#endif // MAINWINDOW_H
